package com.mindfactory.pwdbox.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;

import com.mindfactory.pwdbox.R;


public class StartActivity extends Activity {
	private ImageView startImg;


	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
				WindowManager.LayoutParams.FLAG_FULLSCREEN);
		this.requestWindowFeature(Window.FEATURE_NO_TITLE);

		setContentView(R.layout.start);

		startImg = (ImageView) findViewById(R.id.startImg);
		Animation startAnimation = AnimationUtils.loadAnimation(this,
				R.anim.alpha);
		startAnimation.setAnimationListener(new AnimationListener() {

			@Override
			public void onAnimationEnd(Animation anim) {
					Intent intent = new Intent();
					intent.setClass(StartActivity.this, LoginActivity.class);
					startActivity(intent);
					finish();
			}

			@Override
			public void onAnimationRepeat(Animation anim) {

			}

			@Override
			public void onAnimationStart(Animation anim) {

			}

		});
		startImg.setAnimation(startAnimation);
	}

}
